package cn.kp.learning.service.Impl;
import java.util.HashMap;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import cn.kp.learning.dao.CorePermissionDao;
import cn.kp.learning.model.CorePermission;
import cn.kp.learning.model.CorePermissionExample;
import cn.kp.learning.service.CorePermissionService;

@Service("permissionService")
public class CorePermissionServiceImpl implements CorePermissionService {
	
	@Resource
	private CorePermissionDao permissionDao;
	
	@Override
	public List<CorePermission> getPermissionList(
			CorePermissionExample example) {
		// TODO Auto-generated method stub
		return permissionDao.selectByExample(example);
	}

	@Override
	public CorePermission getPermission(HashMap<String, Object> hm) {
		// TODO Auto-generated method stub
		return permissionDao.selectByPrimaryKey(hm);
	}

	@Override
	public int countPermission(CorePermissionExample example) {
		// TODO Auto-generated method stub
		return permissionDao.countByExample(example);
	}

}
